package com.kingdee.eas.hr.compensation.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.hr.compensation.CmpItemCollection;
import com.kingdee.bos.dao.IObjectPK;
import java.util.Map;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.eas.hr.compensation.FixedCmpSchemeInfo;
import java.util.HashMap;
import java.util.List;



public abstract class AbstractFixedCmpSchemeFacadeControllerBean extends AbstractBizControllerBean implements FixedCmpSchemeFacadeController
{
    protected AbstractFixedCmpSchemeFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("8BD7EE33");
    }

    public void initFixedCmpScheme(Context ctx, IObjectPK fixedCmpSchemePK, CmpItemCollection cmpItemCollection, String salSchemeID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("73b86601-0104-1000-e000-0006c0a813c1"), new Object[]{ctx, fixedCmpSchemePK, cmpItemCollection, salSchemeID});
            invokeServiceBefore(svcCtx);
            _initFixedCmpScheme(ctx, fixedCmpSchemePK, cmpItemCollection, salSchemeID);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _initFixedCmpScheme(Context ctx, IObjectPK fixedCmpSchemePK, IObjectCollection cmpItemCollection, String salSchemeID) throws BOSException, EASBizException;

    public void enablePerson(Context ctx, IObjectPK fixedCmpSchemePK, List lstIDs) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("73b86601-0104-1000-e000-0008c0a813c1"), new Object[]{ctx, fixedCmpSchemePK, lstIDs});
            invokeServiceBefore(svcCtx);
            _enablePerson(ctx, fixedCmpSchemePK, lstIDs);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _enablePerson(Context ctx, IObjectPK fixedCmpSchemePK, List lstIDs) throws BOSException, EASBizException;

    public void auditePerson(Context ctx, IObjectPK fixedCmpSchemePK, List lstIDs) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("92811801-0112-1000-e000-0003c0a80e82"), new Object[]{ctx, fixedCmpSchemePK, lstIDs});
            invokeServiceBefore(svcCtx);
            _auditePerson(ctx, fixedCmpSchemePK, lstIDs);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _auditePerson(Context ctx, IObjectPK fixedCmpSchemePK, List lstIDs) throws BOSException, EASBizException;

    public IRowSet getEmpData(Context ctx, int catalog, IObjectPK fixedCmpSchemePK, EntityViewInfo infoEntityView, List lstCmpItem) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9c7f069f-0104-1000-e000-0023c0a813c1"), new Object[]{ctx, new Integer(catalog), fixedCmpSchemePK, infoEntityView, lstCmpItem});
            invokeServiceBefore(svcCtx);
            IRowSet retValue = (IRowSet)_getEmpData(ctx, catalog, fixedCmpSchemePK, infoEntityView, lstCmpItem);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IRowSet _getEmpData(Context ctx, int catalog, IObjectPK fixedCmpSchemePK, EntityViewInfo infoEntityView, List lstCmpItem) throws BOSException, EASBizException;

    public void updateTable(Context ctx, String hotTableName, List lstColumn, List lstValue) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c17fd856-0104-1000-e000-0011c0a813c1"), new Object[]{ctx, hotTableName, lstColumn, lstValue});
            invokeServiceBefore(svcCtx);
            _updateTable(ctx, hotTableName, lstColumn, lstValue);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateTable(Context ctx, String hotTableName, List lstColumn, List lstValue) throws BOSException, EASBizException;

    public boolean canInitFixedCmpScheme(Context ctx, String pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("df6a687f-0104-1000-e000-0024c0a813c1"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_canInitFixedCmpScheme(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _canInitFixedCmpScheme(Context ctx, String pk) throws BOSException, EASBizException;

    public List getCatalogPersonIDs(Context ctx, int catalog, IObjectPK fixedCmpSchemePK) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("333406bb-0105-1000-e000-0025c0a8102b"), new Object[]{ctx, new Integer(catalog), fixedCmpSchemePK});
            invokeServiceBefore(svcCtx);
            List retValue = (List)_getCatalogPersonIDs(ctx, catalog, fixedCmpSchemePK);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract List _getCatalogPersonIDs(Context ctx, int catalog, IObjectPK fixedCmpSchemePK) throws BOSException, EASBizException;

    public void setupCmpItem(Context ctx, IObjectPK fixedCmpSchemePK, CmpItemCollection cmpItemCollection) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e2d2c380-0106-1000-e000-002dc0a8123d"), new Object[]{ctx, fixedCmpSchemePK, cmpItemCollection});
            invokeServiceBefore(svcCtx);
            _setupCmpItem(ctx, fixedCmpSchemePK, cmpItemCollection);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _setupCmpItem(Context ctx, IObjectPK fixedCmpSchemePK, IObjectCollection cmpItemCollection) throws BOSException, EASBizException;

    public HashMap getPersonCmpItemValue(Context ctx, List lstPerson, String fixedSchemeID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4c072fb3-0108-1000-e000-0003c0a8123d"), new Object[]{ctx, lstPerson, fixedSchemeID});
            invokeServiceBefore(svcCtx);
            HashMap retValue = (HashMap)_getPersonCmpItemValue(ctx, lstPerson, fixedSchemeID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract HashMap _getPersonCmpItemValue(Context ctx, List lstPerson, String fixedSchemeID) throws BOSException, EASBizException;

    public List checkAdjDateValid(Context ctx, Map adjPerMap, List adjPerIdList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9e618c77-011a-1000-e000-0009c0a8121b"), new Object[]{ctx, adjPerMap, adjPerIdList});
            invokeServiceBefore(svcCtx);
            List retValue = (List)_checkAdjDateValid(ctx, adjPerMap, adjPerIdList);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract List _checkAdjDateValid(Context ctx, Map adjPerMap, List adjPerIdList) throws BOSException, EASBizException;

    public Map getFixedReportData(Context ctx, Map paramsMap) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("32a801b3-5e29-4b19-abec-a0ecabc26b5f"), new Object[]{ctx, paramsMap});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_getFixedReportData(ctx, paramsMap);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _getFixedReportData(Context ctx, Map paramsMap) throws BOSException, EASBizException;

    public IObjectPK initFixedCmpScheme(Context ctx, FixedCmpSchemeInfo fixedSchemeInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("12359a67-cb1d-48d1-bd36-5ded13f856f8"), new Object[]{ctx, fixedSchemeInfo});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_initFixedCmpScheme(ctx, fixedSchemeInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _initFixedCmpScheme(Context ctx, FixedCmpSchemeInfo fixedSchemeInfo) throws BOSException, EASBizException;

    public Object getFunValueHrFixedCmp(Context ctx, Map params) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("47f2f90d-228c-4c13-b7ba-8dcdb803dc2c"), new Object[]{ctx, params});
            invokeServiceBefore(svcCtx);
            Object retValue = (Object)_getFunValueHrFixedCmp(ctx, params);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Object _getFunValueHrFixedCmp(Context ctx, Map params) throws BOSException, EASBizException;

    public Map getCmpPersonCatalogEnum(Context ctx, String fixedCmpSchemeID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("61a72d6c-7493-4795-b7ad-f50e85d810ab"), new Object[]{ctx, fixedCmpSchemeID});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_getCmpPersonCatalogEnum(ctx, fixedCmpSchemeID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _getCmpPersonCatalogEnum(Context ctx, String fixedCmpSchemeID) throws BOSException, EASBizException;

}